home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 660 < prev    next >
Encoding:
Text File  |  1996-08-06  |  1.2 KB  |  53 lines

  1. Newsgroups: comp.lang.c++
  2. Path: in1.uu.net!world!mv!usenet
  3. From: ENGR@GSSI.MV.COM (Michael Furman)
  4. Subject: Re: Passing a va_list as a parameter.  How?
  5. Message-ID: <DKpurI.M3@mv.mv.com>
  6. Mime-Version: 1.0
  7. Organization: GSSI
  8. Date: Fri, 5 Jan 1996 16:21:17 GMT
  9. References: <4chi0s$gg7@lys.vnet.net>
  10. X-Newsreader: WinVN 0.93.10
  11. X-Nntp-Posting-Host: gssi.mv.com
  12.  
  13. In article <4chi0s$gg7@lys.vnet.net>, gregg@lys.vnet.net says...
  14. >
  15. >Here's what I'm trying to do:
  16. >
  17. >void foo (int arg1, ...)
  18. >{
  19. >  va_list args;
  20. >  va_start(args,arg1);
  21. >  ...
  22. >  va_end(args);
  23. >}
  24. >
  25. >void callfoo (int arg1, ...)
  26. >{
  27. >  foo (arg1, ...);
  28. >} ^^^^^^^^^^^^^^^^
  29. >
  30. >How can I do this?  
  31.  
  32. You can't. You have to implement second variant of "foo" function that 
  33. will accept second argument of type "va_list" - like vprintf, vsprintf.
  34. BTW - it is a "C" (not C++) question.
  35.  
  36.  
  37. >
  38. >I am using MSVC C++ 4.0.
  39. >
  40. >Thanks,
  41. >
  42. >-Greg G
  43. >
  44.  
  45. -- 
  46. ---------------------------------------------------------------
  47. Michael Furman,                       (603)893-1109
  48. Geophysical Survey Systems, Inc.  fax:(603)889-3984
  49. 13 Klein Drive - P.O. Box 97          engr@gssi.mv.com 
  50. North Salem, NH 03073-0097            71543.1334@compuserve.com
  51. ---------------------------------------------------------------
  52.  
  53.